package com.jr.dao;


import com.jr.entity.Email;

import java.util.List;

public interface EmailDao {
    /**
     * 添加邮箱
     * @param email
     * @return
     * @throws Exception
     */
    int addEmail(Email email)throws Exception;

    /**
     * 根据企业id查询所有邮箱
     * @param enterpriseId 企业id
     * @return email对象
     * @throws Exception
     */
    List<Email> listAllEmail(Integer enterpriseId)throws Exception;

    /**
     * 根据emailId更新状态
     * @param emailId
     * @return 返回int类型 >代表更新成功
     * @throws Exception
     */
    int updateEmailExist(Integer emailId)throws Exception;

    /**
     * 检查email是否存在
     * @param emailName
     * @return
     * @throws Exception
     */
    Email checkEmailIsExist(String emailName)throws Exception;

    /**
     * 根据id设置邮箱默认
     * @return
     * @throws Exception
     */
    int setEmailDefaultById(Integer emailId)throws Exception;
    /**
     * 将所有default_status都设置成普通状态
     * @return
     * @throws Exception
     */
    int setAllEmailDefault()throws Exception;


}
